<template>
  <input ref="input">
</template>
<script>
  export default {
    methods: {
      // 用来从父级组件聚焦输入框 
    focus: function () {
      this.$refs.input.focus()
    }
  }
}
</script>